Compression of bi-level images with explicit representation of ink clusters

ABSTRACT

A system and method facilitating compression of bi-level images with explicit representation of ink clusters is provided. The present invention includes a cluster shape estimator that analyzes connected component information, extracts clusters and stores the cluster in a global dictionary, a page dictionary or a store of unclustered shapes. A bitmap estimation from clusters component determines dictionary positions for clusters stored in the global dictionary which are then encoded. A cluster position estimator determines page positions of clusters of the global dictionary and/or the page dictionary that are then encoded. Further, the global dictionary, the page dictionary and the store of unclustered shapes are also encoded.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.11/734,299, filed Apr. 12, 2007 and entitled COMPRESSION OF BI-LEVELIMAGES WITH EXPLICIT REPRESENTATION OF INK CLUSTERS, which is adivisional of U.S. patent application Ser. No. 10/133,532, filed Apr.25, 2002 and entitled COMPRESSION OF BI-LEVEL IMAGES WITH EXPLICITREPRESENTATION OF INK CLUSTERS. The entireties of these applications areincorporated herein by reference.

TECHNICAL FIELD

The present invention relates generally to digital picture processing,and more particularly to a system and method facilitating compression ofbi-level images with explicit representation of ink clusters.

BACKGROUND OF THE INVENTION

The amount of information available via computers has dramaticallyincreased with the wide spread proliferation of computer networks, theInternet and digital storage means. With such increased amount ofinformation has come the need to transmit information quickly and tostore the information efficiently. Data compression is a technology thatfacilitates the effective transmitting and storing of information

Data compression reduces an amount of space necessary to representinformation, and can be used for many information types. The demand forcompression of digital information, including images, text, audio andvideo has been ever increasing. Typically, data compression is used withstandard computer systems; however, other technologies make use of datacompression, such as but not limited to digital and satellite televisionas well as cellular/digital phones.

As the demand for handling, transmitting and processing large amounts ofinformation increases, the demand for compression of such data increasesas well. Although storage device capacity has increased significantly,the demand for information has outpaced capacity advancements. Forexample, an uncompressed digital picture can require 5 megabytes ofspace whereas the same picture can be compressed without loss andrequire only 2.5 megabytes of space. Thus, data compression facilitatestransferring larger amounts of information. Even with the increase oftransmission rates, such as broadband, DSL, cable modem Internet and thelike, transmission limits are easily reached with uncompressedinformation. For example, transmission of an uncompressed image over aDSL line can take ten minutes. However, the same image can betransmitted in about one minute when compressed thus providing aten-fold gain in data throughput.

In general, there are two types of compression, lossless and lossy.Lossless compression allows exact original data to be recovered aftercompression, while lossy compression allows for data recovered aftercompression to differ from the original data. A tradeoff exists betweenthe two compression modes in that lossy compression provides for abetter compression ratio than lossless compression because some degreeof data integrity compromise is tolerated. Lossless compression may beused, for example, when compressing critical text, because failure toreconstruct exactly the data can dramatically affect quality andreadability of the text. Lossy compression can be used with pictures ornon-critical text where a certain amount of distortion or noise iseither acceptable or imperceptible to human senses.

Bi-level images are quite common in digital document processing, becausethey offer the potential for a compact representation of black-and-whitedocuments containing texts and drawings. In such images, their pictureelements (pixels) can be seen as coming from a binary source (e.g.,white=“0” and black=“1”). Since they usually contain a lot of whitespace and repeated ink patterns, one basic approach to efficientlyencode such images is to scan them in raster order, e.g., from top tobottom and left to right, and encode each pixel via adaptive arithmeticcoding (AC), whose state (or probability table) is controlled by acontext formed by the values of the pixels in a small template enclosingpreviously encoded pixels. That idea is the basis of most modernbi-level image compression systems.

Facsimile images are usually transmitted using the old CCITT standardsT.4 and T.6, which are usually referred to as Group 3 and Group 4respectively. G3 usually encodes images with a modified Huffman (MH)code (i.e., Huffman coding on runs of black or white pixels), and G4uses “modified modified read” (MMR) coding. MH and MMR are not asefficient as context-adaptive AC, but are simpler to implement. Overtime, G3 and G4 evolved to include encoding via JBIG point bi-levelimage group, also known as recommendation T.82). JBIG uses thecontext-adaptive AC, with adaptive templates and the efficient QM binaryarithmetic encoder. The JBIG-2 standard extends JBIG by includingpattern matching for text and halftone data, as well as soft patternmatching (SPM) for lossy encoding. The JB2 encoder is also based on SPM,but uses the Z-coder for binary encoding. JBIG, JBIG-2 and JB2 canprovide a significant improvement in compression performance over G4.

SUMMARY OF THE INVENTION

The following presents a simplified summary of the invention in order toprovide a basic understanding of some aspects of the invention. Thissummary is not an extensive overview of the invention. It is notintended to identify key/critical elements of the invention or todelineate the scope of the invention. Its sole purpose is to presentsome concepts of the invention in a simplified form as a prelude to themore detailed description that is presented later.

The present invention provides for a bi-level encoding system thatextends current bi-level coding technology by making the priorassumption that a bitmap corresponds to a scanned document, which islikely to contain significant amounts of text. A scanned document caninclude bitmap patterns for character(s) corresponding to cluster(s) ofblack pixels. For purposes of discussion it is assumed that thebackground of the document is substantially white and the text issubstantially black. However, any suitable bi-level color presentationfor employment in connection with the present invention is intended tofall within the scope of the appended claims.

The bi-level encoding system scans a bitmap (e.g., from left to rightand from top to bottom). The first time a cluster of ink is found, it isadded to a dictionary of clusters. Then, instead of encoding the pixelsfor that cluster, a pointer P to the dictionary and the {X,Y} positionalcoordinates to where the cluster appears on the page is encoded. Nexttime the same cluster or a cluster that is close enough is found in thebitmap, we encode again not the pixels, but just the {P,X,Y}coordinates. If the cluster contains enough pixels, it is more efficientto encode the {P,X,Y} coordinates than to encode the pixels with alossless encoder such as the bi-level codec (BLC), described incopending U.S. Patent Application entitled ADAPTIVE ENCODING ANDDECODING OF BI-LEVEL IMAGES, having client docket No. MS158314.1. Thecompression gain is higher for multi-page documents, because the clusterdictionary can be shared among all pages, so the overhead of encodingthe dictionary itself becomes negligible.

The bi-level coding system can operate in lossless mode or lossy mode.In lossless mode, if a cluster in the bitmap is within a first thresholdamount of a cluster in the dictionary, the {P,X,Y} data is sent as wellas a “clustering residual”—the small difference(s) between the actualcluster and that in the dictionary. The clustering residual can beencoded using a lossless bi-level encoder. In lossy mode, if a clusterin the bitmap is within a second threshold amount of a cluster in thedictionary, the triplet {P,X,Y} is encoded; however, the clusteringresidual is not encoded.

The bi-level encoding system of the present invention can result infiles that are, for example, significantly smaller than those generatedby conventional scanners (e.g., CCITT G4). Thus, the bi-level encodingsystem can have significant impact on document transmittal and/orstorage application(s), for example, digital libraries and digitaldocument databases.

In accordance with an aspect of the present invention, the bi-levelencoding system can include a cluster shape estimator, a bitmapestimation from clusters component, a cluster position estimator, afirst encoder, a second encoder, a third encoder, and a fourth encoder.The cluster shape estimator analyzes connected component information(e.g., color, horizontal size, vertical size, horizontal position and/orvertical position) associated with a bitmap. The cluster shape estimatorextracts clusters and stores them into at least one of a globaldictionary of shapes, a page dictionary of shapes and a store ofunclustered shapes.

In lossy mode, the cluster shape estimator can determine whether acluster is within the second threshold amount of a cluster in the globaldictionary. In one example, if the cluster is within the secondthreshold amount, the presence of the cluster on the page is noted. Inanother example, if the cluster is within the second threshold amount,the present of the cluster on the page is noted and the cluster storedin the global dictionary is modified based, at least in part, upon thecluster. For example, the cluster shape estimator can perform a weightedaverage of the cluster stored in the global dictionary and the clusterresulting in a modified cluster stored in the global dictionary. Thiscan result in clearer text in a decoded bitmap when compared with theoriginal bitmap. In yet another example, the first threshold (e.g.,employed with regard to lossless mode) and the second threshold (e.g.,employed with regard to lossy mode) have about the same value.

The global dictionary of shapes includes global clusters. Globalclusters are clusters that occur more than once on the current bitmap(e.g., page) and/or were previously processed as part of the samedocument.

The page dictionary of shapes comprises page-level cluster(s)—cluster(s)that were found once on the current bitmap (e.g., page). For example,once the cluster shape estimator has substantially completed analysis ofthe current bitmap (e.g., page), a portion of the page dictionary ofshapes comprising cluster(s) which were found only once on the currentbitmap (e.g., page) can be sent (e.g., included in an encoded file). Theindices (e.g., pointers) into the page dictionary do not have to beencoded because the page dictionary is ordered by cluster appearance onthe page and page-level clusters, by definition, only occur once on thepage.

The page dictionary of shapes can store clusters which occurred onlyonce of previous bitmaps (e.g., pages), such that if a second occurrenceof a substantially similar cluster is found on a later bitmap, thecluster can be stored in the global dictionary and removed from the pagedictionary. The store of unclustered shapes stores connectedcomponent(s) that are either too small (e.g., smaller than a thirdthreshold) or large (e.g., larger than a fourth threshold) to be textcharacters and therefore do not cluster well.

The bitmap estimation from clusters component determines dictionarypositions for clusters stored in the global dictionary. The bitmapestimation from clusters component can utilize information (e.g.,pointers) from the cluster shape estimator. The pointers are thenencoded by the second encoder. Because the clusters have been sorted byposition on the page, the indices (e.g., pointers) tend to form a textstring-like order and, in one example, the second encoder can employ acompression algorithm suitable for text strings (e.g., LZX encoding).

In lossless mode, the bitmap estimation from clusters component candetermine clustering residual(s). The bitmap estimation from clusterscomponent can provide the information to the fourth encoder, to beencoded with the store of unclustered shapes (e.g., utilizing losslessbi-level encoding).

The cluster position estimator determines page positions of clusters ofthe global dictionary and/or the page dictionary utilizing the connectedcomponent information. Thus, for a cluster in the global dictionaryand/or the page dictionary, its position on a page is determinedutilizing the connected component information and the properties from adictionary entry from either the global dictionary or the pagedictionary. The page positions are then encoded by the first encoder.

In one example, the horizontal (x-direction) gap between clusters on aline is encoded since clusters to be regularly spaced, particularlywithin words. Additionally, for a line, an average horizontal gap can becalculated and encoded, with gap information thereafter being based onthe difference between the average horizontal gap and the actualhorizontal gap.

In another example, an average vertical (y-direction) value iscalculated. The average vertical value for a line is encoded andthereafter for a cluster, the difference between the cluster's verticalvalue and the average vertical value is encoded. The bottom edge of thecluster's bounding box can be utilized as more letters in the Romanalphabet are aligned along the bottom edge than the top. As a result,the difference between a given cluster and the average tends to besmall. Since the first encoder encodes on a line-by-line basis, thefirst horizontal value (x direction) and the average Y-value per linecan be encoded.

The first encoder encodes page positions received from the clusterposition estimator. For example, the first encoder can utilize bit-planeencoding. The second encoder encodes the dictionary positions receivedfrom the bitmap estimation from clusters component (e.g., LZX encoding).

The third encoder encodes the bitmap patterns in the page dictionaryand/or the global dictionary and can utilize lossless bi-level bitmapencoding. The fourth encoder encodes the store of unclustered shapes andcan utilize lossless bi-level bitmap encoding.

There has been an increased emphasis placed on the “paperless office”which typically means converting documents from paper to electronicform. Converted documents utilizing conventional technology, whileenabling a user to scan, store and/or manipulate electronic documents,has resulting in large files. For example, with many scanners, it iseasy to generate 1 megabyte of data for 20 scanned pages or so. Itbecomes difficult for the user to send scanned documents via e-mail forexample, where the resulting large files can be a problem. However, ascanner utilizing the system and/or method of the present invention canreduce the storage requirement, for example, to as little as 1 megabyteper 200 scanned pages, so that a 50-page legal document, for example,would produce a “.blc” file of just 250 kilobytes, which can be quicklytransmitted via e-mail.

Further, on a clean document, the gain of the system and/or method ofthe present invention over the common G4 format can be, for example, afactor of ten. On noisy documents, the compression gain over G4 can be afactor of five, or a factor of three in the limit of a very shortdocument (a single page).

Another aspect of the present invention provides for the bi-levelencoding system to further include a clustering system and/or anactivity detection system.

The clustering system identifies information associated with a pluralityof clusters (e.g., connected components). For example, the informationcan include width (e.g., x size), height (e.g., y size), color,horizontal position (e.g., absolute and/or relative) and/or verticalposition (e.g., absolute and/or relative) of the plurality of clusters(e.g., connected components).

The activity detection system receives a bi-level image input. Forexample, bi-level image input can be a binary mask received from a maskseparator component (not shown) or a scanned image (e.g., from adocument scanner and/or a facsimile machine). The activity detectionsystem analyzes the bi-level image for dithering/half toning and/ornoise. The activity detection system provides a bi-level image outputbased on the bi-level image input; however, with reduced dithering/halftoning and/or noise.

Bi-level image(s) based on document image(s) having dithering/halftoning typically have a significant quantity of connected component(s)in and/or intersecting the region. Additionally, bi-level image(s)having noise typically have few connected component(s) in and/orintersecting the region. Thus, by determining the quantity of connectedcomponent(s) in and/or intersecting the region, the activity detectionsystem can detect areas in which dithering/half toning and/or noise islikely present.

In addition to detecting dithering as discussed above, the activitydetection system can further be adapted to detect noise in the bi-levelimage input. “Noise” refers to extraneous information (e.g., mark(s))deletion of which will not substantially compromise integrity of thebi-level image. Removal of noise in the bi-level image input can lead toimproved data compression resulting from a smoother image. A region of abi-level image having noise would typically exhibit relatively littleconnectivity. For example, a region comprising solely a connected straymark on a white background would have one connected component.

Yet another aspect of the present invention provides for a selectablebi-level encoding system having a bi-level encoding system, a losslessbi-level encoder and a selection component.

The lossless bi-level encoder can employ lossless bi-level encodingtechnique(s). The selection component allows for a selection betweenlossless bi-level encoding, utilizing the lossless bi-level encoder, andthe bi-level encoding system (e.g., employing clusters (lossless orlossy)). Selection can be based, for example, upon a user preferenceand/or by a clustering system within the bi-level encoding system.

Another aspect of the present invention provides for a bi-level decodingsystem having a first decoder, a second decoder, a third decoder, afourth decoder, a cluster generator and a combiner.

The first decoder decodes at least part of a bit stream input (e.g.,produced by a corresponding encoder) and provides page position(s) ofcluster(s). The second decoder decodes at least part of a bit streaminput (e.g., produced by a corresponding encoder) and provides decodeddictionary positions. The third decoder decodes at least part of a bitstream input (e.g., produced by a corresponding encoder) and provides adecoded global dictionary of shapes and/or a decoded page dictionary ofshapes. The fourth decoder decodes at least part of a bit stream input(e.g., produced by a corresponding encoder) and provides a store ofunclustered shapes.

The cluster generator generates clusters based, at least in part, uponthe page positions, dictionary positions and at least one of the globaldictionary and page dictionary. The combiner provides a bi-level outputbased, at least in part, upon the clusters generated by the clustergenerator and/or the store of unclustered shape(s).

Another aspect of the present invention provides for the bi-levelencoding system to be employed in a vast array of document imageapplications, including, but not limited to, tablet person computers,segmented layered image systems, photocopiers, document scanners,optical character recognition systems, personal digital assistants, faxmachines, digital cameras, digital video cameras and/or video games.

Other aspects of the present invention provide methods for performingbi-level encoding, cluster analysis and bi-level decoding. Furtherprovided are a computer readable medium having computer usableinstructions for a system for bi-level encoding and a computer readablemedium having computer usable instructions for a system for bi-leveldecoding. Also provided is a data packet adapted to be transmittedbetween two or more computer components that facilitates bi-levelencoding comprising a first data field comprising encoded pagepositions, a second data field comprising encoded dictionary positions,a third data field comprising at least one of an encoded globaldictionary and an encoded page dictionary; and, a fourth data fieldcomprising encoded store of unclustered shapes.

To the accomplishment of the foregoing and related ends, certainillustrative aspects of the invention are described herein in connectionwith the following description and the annexed drawings. These aspectsare indicative, however, of but a few of the various ways in which theprinciples of the invention may be employed and the present invention isintended to include all such aspects and their equivalents. Otheradvantages and novel features of the invention may become apparent fromthe following detailed description of the invention when considered inconjunction with the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a bi-level encoding system in accordancewith an aspect of the present invention.

FIG. 2 is a diagram illustrating 4-connectivity property.

FIG. 3 is a diagram illustrating 8-connectivity property.

FIG. 4 is an exemplary connected component bounding box in accordancewith an aspect of the present invention.

FIG. 5 is an exemplary global dictionary data structure in accordancewith an aspect of the present invention.

FIG. 6 is a block diagram of a bi-level encoding system in accordancewith an aspect of the present invention.

FIG. 7 is a block diagram of a selectable bi-level encoding system inaccordance with an aspect of the present invention.

FIG. 8 is a block diagram of a bi-level decoding system in accordancewith an aspect of the present invention.

FIG. 9 is a flow chart illustrating a methodology for performingbi-level encoding in accordance with an aspect of the present invention.

FIG. 10 is a flow chart illustrating a methodology for performingbi-level encoding in accordance with an aspect of the present invention.

FIG. 11 is a flow chart further illustrating the methodology of FIG. 10.

FIG. 12 is a flow chart illustrating a methodology for performingcluster analysis in accordance with an aspect of the present invention.

FIG. 13 is a flow chart further illustrating the methodology of FIG. 12.

FIG. 14 is a flow chart illustrating a methodology for performingbi-level decoding in accordance with an aspect of the present invention.

FIG. 15 illustrates an example operating environment in which thepresent invention may function.

DETAILED DESCRIPTION OF THE INVENTION

The present invention is now described with reference to the drawings,wherein like reference numerals are used to refer to like elementsthroughout. In the following description, for purposes of explanation,numerous specific details are set forth in order to provide a thoroughunderstanding of the present invention. It may be evident, however, thatthe present invention may be practiced without these specific details.In other instances, well-known structures and devices are shown in blockdiagram form in order to facilitate describing the present invention.

As used in this application, the term “computer component” is intendedto refer to a computer-related entity, either hardware, a combination ofhardware and software, software, or software in execution. For example,a computer component may be, but is not limited to being, a processrunning on a processor, a processor, an object, an executable, a threadof execution, a program, and/or a computer. By way of illustration, bothan application running on a server and the server can be a computercomponent. One or more computer components may reside within a processand/or thread of execution and a component may be localized on onecomputer and/or distributed between two or more computers.

Referring to FIG. 1, a bi-level encoding system 100 in accordance withan aspect of the present invention is illustrated. The bi-level encodingsystem 100 includes a cluster shape estimator 110, a bitmap estimationfrom clusters component 120, a cluster position estimator 130, a firstencoder 140, a second encoder 150, a third encoder 160 and a fourthencoder 170.

The bi-level encoding system 100 extends current bi-level codingtechnology by making the prior assumption that a bitmap corresponds to ascanned document, which is likely to contain significant amounts oftext. A scanned document can include bitmap patterns for character(s)corresponding to cluster(s) of black pixels. For purposes of discussionit is assumed that the background of the document is substantially whiteand the text is substantially black. However, any suitable bi-levelcolor presentation for employment in connection with the presentinvention is intended to fall within the scope of the appended claims.

The bi-level encoding system 100 scans a bitmap (e.g., from left toright and from top to bottom). The first time a cluster of ink is found,it is added to a dictionary of clusters. Then, instead of encoding thepixels for that cluster, a pointer P to the dictionary and the {X,Y}positional coordinates to where the cluster appears on the page isencoded. Next time the same cluster or a cluster that is close enough isfound in the bitmap, we encode again not the pixels, but just the{P,X,Y} coordinates. If the cluster contains enough pixels, it is moreefficient to encode the {P,X,Y} coordinates than to encode the pixelswith the lossless BLC. The compression gain is higher for multi-pagedocuments, because the cluster dictionary can be shared among all pages,so the overhead of encoding the dictionary itself becomes negligible.

The bi-level coding system 100 can operate in lossless mode or lossymode. In lossless mode, if a cluster in the bitmap is within a firstthreshold amount of a cluster in the dictionary, the {P,X,Y} data issent as well as a “clustering residual”—the small difference(s) betweenthe actual cluster and that in the dictionary. The clustering residualcan be encoded using a lossless bi-level encoder. In lossy mode, if acluster in the bitmap is within a second threshold amount of a clusterin the dictionary, the triplet {P,X,Y} is encoded; however, theclustering residual is not encoded.

The bi-level encoding system 100 of the present invention can result infiles that are, for example, significantly smaller than those generatedby conventional scanners (e.g., CCITT G4). Thus, the bi-level encodingsystem 100 can have significant impact on document transmittal and/orstorage application(s), for example, digital libraries and digitaldocument databases.

The cluster shape estimator 110 analyzes connected component informationassociated with a bitmap. For example, the connected componentinformation can include color, horizontal size, vertical size,horizontal position and/or vertical position of the connectedcomponents. The cluster shape estimator 110 extracts clusters and storesthem into at least one of a global dictionary of shapes 172, a pagedictionary of shapes 174 and a store of unclustered shapes 176.

Referring briefly to FIG. 2, a diagram 200 depicting the 4-connectivityproperty is illustrated. The 4-connectivity property only identifiesconnected pixels in four primary compass directions. FIG. 2 illustratesthe 4-connectivity property by showing a pixel surrounded by 4 pixels inthe four primary compass directions. Turning next to FIG. 3, a diagram300 depicting the 8-connectivity property is illustrated. FIG. 3illustrates the 8-connectivity property by showing a pixel surrounded by8 pixels in the eight principal directions. Connected components caninclude text as well as non-textual marks. It is to be appreciated thatthe systems and methods of the present invention can employ connectedcomponents having any suitable degree of connectivity and is not limitedto connected components of 4-connectivity or 8-connectivity.

Turning briefly to FIG. 4, an exemplary connected component bounding box400 in accordance with an aspect of the present invention isillustrated. The bounding box 400 generally comprises a rectangleencompassing a connected component having an x size (width) and a y size(height).

Referring back to FIG. 1, in lossy mode, the cluster shape estimator 110can determine whether a cluster shape is within the second thresholdamount of a cluster in the global dictionary 172. In an exemplaryimplementation, shape proximity is determined by aligning the candidateshape with the dictionary shape, and then counting the fraction ofpixels in the candidate shape whose value (black or white) differ fromthe pixels in the dictionary shape. In one example, if the cluster iswithin the second threshold amount, the presence of the cluster on thepage is noted. In another example, if the cluster is within the secondthreshold amount, the present of the cluster on the page is noted andthe cluster stored in the global dictionary 172 is modified based, atleast in part, upon the cluster. For example, the cluster shapeestimator 110 can perform a weighted average of the cluster stored inthe global dictionary 172 and the cluster resulting in a modifiedcluster stored in the global dictionary 172. This can result in clearertext in a decoded bitmap when compared with the original bitmap.

The global dictionary of shapes 172 includes global clusters. Globalclusters are clusters that occur more than once on the current bitmap(e.g., page) and/or were previously processed as part of the samedocument. Referring briefly to FIG. 5, an exemplary global dictionarydata structure 500 in accordance with an aspect of the present inventionis illustrated. The global dictionary data structure 500 has a firstfield 510 storing an index into the data structure 500, a second field520 storing a width (e.g., x size), a third field 530 storing a height(e.g., y size) and a fourth field 540 storing a bitmap of the globalcluster. For example, the x size can be the maximum width of theconnected component and the y size can be the maximum height of theconnected component. The data structure 500 can comprise a plurality ofglobal cluster entries 550.

The data structure 500 is merely exemplary and it is to be appreciatedthat numerous other structures are contemplated that provide fororganizing and/or storing a plurality of data types conducive tofacilitating bi-level encoding in connection with the subject invention.Any such data structure suitable for employment in connection with thepresent invention is intended to fall within the scope of the appendedclaims. Such data structures can be stored in computer readable mediaincluding, but not limited to, memories, disks and carrier waves.

Referring back to FIG. 1, the page dictionary of shapes 174 comprisespage-level cluster(s)—cluster(s) that were found once on the currentbitmap (e.g., page). For example, once the cluster shape estimator 110has substantially completed analysis of the current bitmap (e.g., page),a portion of the page dictionary of shapes 174 comprising cluster(s)which were found only once on the current bitmap (e.g., page) can besent (e.g., included in an encoded file). The indices (e.g., pointers)into the page dictionary 174 do not have to be encoded because the pagedictionary 174 is ordered by cluster appearance on the page andpage-level clusters, by definition, only occur once on the page.

In one example, each page has its own page dictionary 174 which isencoded after a page has been processed. Accordingly, entries in aprevious page dictionary 174 are never removed. Once a page has beenprocessed, its page dictionary 174 is encoded and can never be modified.

The page dictionary of shapes 174 can store clusters which occurred onlyonce of previous bitmaps (e.g., pages), such that if a second occurrenceof a substantially similar cluster is found on a later bitmap, thecluster can be stored in the global dictionary 172 and removed from thepage dictionary 174. The store of unclustered shapes 176 storesconnected component(s) that are either too small (e.g., smaller than athird threshold) or large (e.g., larger than a fourth threshold) to betext characters and therefore do not cluster well.

Thus, the cluster shape estimator 110 extracts clusters and stores theclusters into at least one of the global dictionary of shapes 172, thepage dictionary of shapes 174 and the store of unclustered shapes 176.The cluster shape estimator 110 can provide information (e.g., pointersinto the global dictionary of shapes 172) to the bitmap estimation fromclusters component 120.

The bitmap estimation from clusters component 120 determines dictionarypointers for clusters stored in the global dictionary. The bitmapestimation from clusters component 120 can utilize information (e.g.,pointers) from the cluster shape estimator 110, in addition to clusterdictionary information. The pointers are then encoded by the secondencoder 150. Because the clusters tend to capture the characters oftext, the indices (e.g., pointers) tend to form a string-like ordermapping closely to the text strings in the document. Thus, in oneexample, the second encoder 150 can employ a compression algorithmsuitable for text strings. For example, the second encoder 150 canutilize LZX encoding.

In lossless mode, the bitmap estimation from clusters component 120 candetermine clustering residual(s). The bitmap estimation from clusterscomponent 120 can provide the information to the fourth encoder 170, tobe encoded with the store of unclustered shapes 176 (e.g., utilizinglossless bi-level encoding).

The cluster position estimator 130 determines page positions of clustersof the global dictionary 172 and/or the page dictionary 174 utilizingthe connected component information. Thus, for a cluster in the globaldictionary 172 and/or the page dictionary 174, its position on a page isdetermined utilizing the connected component information and theproperties from a dictionary entry from either the global dictionary 172or the page dictionary 174. The page positions are then encoded by thefirst encoder 140. Because the clusters have been sorted by position onthe page, the page positions tend to increase monotonically. So, in anexemplary implementation the first encoder 140 encodes positions bycomputing position differences {e.g. Xcurrent−Xprevious andYcurrent−Yprevious}, and encoding such differences with an entropyencoder suitable for integers that are more likely to assume smallvalues, such as a bit-plane encoder as described in copending U.S.Patent Application entitled Lossless Adaptive Encoding of FiniteAlphabet Data, having client docket No. MS 127658.1.

In one example, the horizontal (x-direction) gap between clusters on aline is encoded since clusters to be regularly spaced, particularlywithin words. Additionally, for a line, an average horizontal gap can becalculated and encoded, with gap information thereafter being based onthe difference between the average horizontal gap and the actualhorizontal gap.

In another example, an average vertical (y-direction) value iscalculated. The average vertical value for a line is encoded andthereafter for a cluster, the difference between the cluster's verticalvalue and the average vertical value is encoded. The bottom edge of thecluster's bounding box can be utilized as more letters in the Romanalphabet are aligned along the bottom edge than the top. As a result,the difference between a given cluster and the average tends to besmall. Since the first encoder 140 encodes on a line-by-line basis, thefirst horizontal value (x direction) and the average Y-value per linecan be encoded.

The first encoder 140 encodes page positions received from the clusterposition estimator 130. For example, the first encoder 140 can utilizebit-plane encoding. The second encoder 150 encodes the dictionarypositions received from the bitmap estimation from clusters component120 (e.g., LZX encoding).

The third encoder 160 encodes the bitmap patterns in the page dictionaryand/or the global dictionary and can utilize lossless bi-level bitmapencoding. The fourth encoder 170 encodes the store of unclustered shapesand can utilize lossless bi-level bitmap encoding.

While FIG. 1 is a block diagram illustrating components for the bi-levelencoding system 100, it is to be appreciated that the cluster shapeestimator 110, the cluster position estimator 120, the bit mapestimation from cluster component 130, the first encoder 140, the secondencoder 150, the third encoder 160 and/or the fourth encoder 170 can beimplemented as one or more computer components, as that term is definedherein. Thus, it is to be appreciated that computer executablecomponents operable to implement the bi-level encoding system 100, thecluster shape estimator 110, the cluster position estimator 120, the bitmap estimation from cluster component 130, the first encoder 140, thesecond encoder 150, the third encoder 160 and/or the fourth encoder 170can be stored on computer readable media including, but not limited to,an ASIC (application specific integrated circuit), CD (compact disc),DVD (digital video disk), ROM (read only memory), floppy disk, harddisk, EEPROM (electrically erasable programmable read only memory) andmemory stick in accordance with the present invention.

Turning next to FIG. 6, a bi-level encoding system 600 in accordancewith an aspect of the present invention is illustrated. The bi-levelencoding system 600 includes a cluster shape estimator 110, a bitmapestimation from clusters component 120, a cluster position estimator130, a first encoder 140, a second encoder 150, a third encoder 160 anda fourth encoder 170. The bi-level encoding system 600 further includesa clustering system 610 and/or an activity detection system 620.

The clustering system 610 identifies information associated with aplurality of clusters (e.g., connected components). For example, theinformation can include width (e.g., x size), height (e.g., y size),color, horizontal position (e.g., absolute and/or relative) and/orvertical position (e.g., absolute and/or relative) of the plurality ofclusters (e.g., connected components).

The activity detection system 620 receives a bi-level image input. Forexample, bi-level image input can be a binary mask received from a maskseparator component (not shown) or a scanned image (e.g., from adocument scanner and/or a facsimile machine). The activity detectionsystem 620 analyzes the bi-level image for dithering/half toning and/ornoise. The activity detection system 620 provides a bi-level imageoutput based on the bi-level image input; however, with reduceddithering/half toning and/or noise.

Bi-level image(s) based on document image(s) having dithering/halftoning typically have a significant quantity of connected component(s)in and/or intersecting the region. Additionally, bi-level image(s)having noise typically have few connected component(s) in and/orintersecting the region. Thus, by determining the quantity of connectedcomponent(s) in and/or intersecting the region, the activity detectionsystem 620 can detect areas in which dithering/half toning and/or noiseis likely present.

In addition to detecting dithering as discussed above, the activitydetection system 620 can further be adapted to detect noise in thebi-level image input. “Noise” refers to extraneous information (e.g.,mark(s)) deletion of which will not substantially compromise integrityof the bi-level image. Removal of noise in the bi-level image input canlead to improved data compression resulting from a smoother image. Aregion of a bi-level image having noise would typically exhibitrelatively little connectivity. For example, a region comprising solelya connected stray mark on a white background would have one connectedcomponent.

It is to be appreciated that the clustering system 610 and/or theactivity detection system 620 can be implemented as one or more computercomponents, as that term is defined herein.

Referring next to FIG. 7, a selectable bi-level encoding system 700 inaccordance with an aspect of the present invention is illustrated. Theselectable bi-level encoding system 700 includes a bi-level encodingsystem 600, a lossless bi-level encoder 710 and a selection component720.

The lossless bi-level encoder 710 can employ lossless bi-level encodingtechnique(s). For example, the lossless bi-level encoder 710 can utilizean encoding process (BLC) that does not use arithmetic coding, but whoseperformance is close to that of state-of-the-art coders such as JBIG,JBIG-2, and JB2. In general, the bi-level coder (BLC) uses twocontext-based adaptive modules: 1) an adaptive predictor controlled bylow-resolution probability estimates that is used to map the originalpixels explicitly into prediction error pixels, and 2) abackward-adaptive Run-Length-Rice (RLR) coder that encodes theprediction error pixels. That's contrary to the usual approach where thecontext-dependent probability estimate controls both pixel predictionand adaptive entropy coding. Due to its simplicity, in many applicationsBLC may be a better choice other current coders.

The bi-level image compression encoding begins with a pixel predictionand prediction error generation procedure. Pixel prediction generallyentails predicting the value of a pixel (e.g., either 0 or 1) based onsurrounding pixels. More particularly, pixel prediction is accomplishedby computing context-dependent probability estimates. A context isessentially a neighborhood of previously encoded pixels forming apattern referred to as a template. Any standard template can be adoptedfor the purposes of the present invention. The context can be viewed asvector list of a prescribed number of pixel values in raster order.These values form a binary word that uniquely identifies the context.This binary word is referred to as a context index.

The context-dependent probability estimates are computed by firstcreating and initializing a pixel probability table. This isaccomplished by assigning an initial probability to each of the possiblecontext indexes. Preferably, the initial probability would be 0.5 (i.e.,an equal possibility that the pixel associated with the context index isblack or white). The probability value is however scaled to prevent anyround-off problems between the encoder and decoder. Preferably, thescaling is done by choosing an integer number representing a probabilityof 100% that a pixel is white. For example, in tested embodiments of thepresent invention the number “8” was employed. Thus, the scaledprobability representing the aforementioned initial value would be “4”.

For each pixel in raster order, the context index associated with thepattern of previously encoded pixels is identified and the scaledprobability read from the table. If the probability is 0.5 or above(i.e., a scaled probability of 4 or above in the example given above),then the pixel under consideration is predicted to be white and assignedthe appropriate binary value (e.g., preferably a “0” pixel value). Notethat the first time each context index is encountered, the predictionwill always be a white pixel since a scaled probability of 4 wasinitially assigned to each context index in the table. The scaledprediction value is then adjusted by increasing it by a prescribedamount (e.g., by one) if the pixel just predicted was deemed to bewhite, or decreasing it by a prescribed amount (e.g., by one) if thepixel was predicted to be black. The results of the scaled probabilityadjustment operation are truncated to a zero value if it falls belowzero, and to the maximum scaled probability value minus one if it fallsabove that value. Thus, the probabilities will vary depending on theimage being encoded and what pixel location is being predicted. This isreferred to as backward adaptive pixel prediction, since the decoder canperform the same adjustments to the probability estimates without theneed for explicit context probability information to be sent to thedecoder.

The prediction error is computed next. Essentially, the prediction erroris computed by comparing the predicted pixel value of either black orwhite for each pixel in the bi-level image to the actual pixel. Then,only data concerning those predictions that are incorrect need betransmitted. In most cases, the prediction will be correct, so aconsiderable savings in the amount of data can be realized. This worksbecause as will be described later, the decoder performs the sameprediction process and will get the same results including the errors.Thus, all the decoder needs to know is which of the predicted pixelvalues are in error so they can be changed from white to black or blackto white, as the case may be, to reconstruct the image. The predictionerror is specifically computed using a binary technique such that theactual value of each pixel in the image is compared to its predictedvalue using exclusive OR logic. Thus, if the actual pixel value matchesthe predicted value (e.g., both are 0's or both are 1's), then a “0” isassigned to that pixel location as part of a so-called prediction errorimage. However, if the actual pixel value is different from thepredicted value, then a “1” is assigned to the associated pixel locationin the prediction error image.

The next phase of the bi-level image encoding involves the use of acontext-dependent, backward-adaptive, Run-Length-Rice (RLR) codingprocedure. As it has been found that the predicted value will usuallymatch the actual value, the prediction error image is composed mostly of0's. This makes the prediction error image particularly amenable tofurther compression, thus allowing even less information to betransmitted. To encode the prediction error image, it is preferred theRLR encoding technique be used. In general a RLR coder is avariable-to-variable length entropy coder in which uninterrupted runs of2^(k) zeros are represented by a codeword formed by a single “0”, andpartial runs of r zeros (r<2^(k)) followed by a 1 are represented by acodeword formed by a 1 followed by the k-bit binary word representationof r. The variable k defines the maximum run length of zeros that canoccur in the prediction error image before a codeword is transmitted.Adjusting this variable controls the efficiency of the coding operation.The preferred technique is to employ a backwards-adaptive approach foradjusting k. This approach involves choosing an initial value for k andthen adjusting it up or down in increments based on whether a “0”codeword is generated or a “1+k-bit binary word” code is generated. TheRLR encoding technique according to the present invention is also madedependent on the previously described contexts. Specifically, anencoding table is established which assigns a k variable to each contextindex. The encoding table is updated to reflect the changes to the kvalues that may occur during the encoding of the bi-level image, as willbe explained next.

The aforementioned context-dependent, backward adaptive, RLR encodingtechnique involves first initializing the aforementioned encoding tableby setting the k value associated with each context index to aprescribed initial value (e.g., k=2). In addition, a scaled version ofthe k variable designated as the Rice parameter k′ is assigned to eachcontext. For example, a simple scaling factor could be multiplied by thecurrent k value to produce the current k′ value, which would be greaterthan the k value.

When a prediction error value is established for a pixel location, thepresent RLR coder identifies the context index associated with thatpixel location as determined in the prediction error determinationprocess described earlier. The k value currently assigned to thatcontext index is then read from the encoding table. In the case wherethe pixel location under consideration is the first pixel in rasterorder in the image (i.e., the upper left hand corner pixel), theassociated k value read from the table is used to calculate the runlength, where the run length is preferably equal to 2^(k). This runlength represents the number of consecutive white pixels in raster orderthat must exist in order to generate a “0” codeword. When the nextprediction error value is computed, it is determined whether it is a “1”or a “0”. If it is a “0”, then it is determined if this value is in the“middle” of the previously computed run length under consideration orwhether it represents the end of this run length. If it does notrepresent the end of a run, no codeword is generated. If, however, theprediction error value does represent the end of a run, then a “0”codeword is transmitted. Of course in order to know whether anprediction error value represents the end of the current run length, thepresent RLR coder must keep track of how many “0” have been encountered.This is preferably done by also including run counters in the encodingtable. Specifically, a separate run counter would be assigned to eachcontext index. In one embodiment the run counter would initially be setto the computed run length value. Then, each time a “0” is encounteredas discussed above, including the first in the series, the counter isdecremented by one. When the counter reaches zero, the prediction errorvalue currently being process is deemed to be the end of the current runlength. If, on the other hand, a prediction error value of “1” isencounter at any time during a run, then the present RLR coder generatesa “1+k-bit binary word” code where the k-bit binary word represents thenumber of “0's” encountered in the current run prior to encountering the“1”. The number of “0's” encountered can be easily determined using theaforementioned run counter assigned to the context index associated withthe pixel location where the run began. Once a codeword has beengenerated, whether it is a “0” or a “1+k-bit binary word”, the very nextprediction error value that is generated is used to start another run.This is accomplished as it was for the first pixel location byidentifying the context index associated with the pixel location of theprediction error value and repeating the foregoing process.

In addition, substantially every time a codeword is generated, thek-value associated with the run that resulted in the codeword isadjusted. This is preferably accomplished as follows. If the codewordgenerated was a “0”, then the parameter k′ is increased by a prescribedamount. Conversely, if the codeword was not a “0”, then the parameter k′is decreased by a prescribed amount. This prescribed amount can vary, ifdesired, depending on the current value of k′. The new k value iscomputed by dividing the new k′ value by the aforementioned scalingfactor. The new value for k′ is then stored in the encoding table inplace of the previous value. By adjusting k′ by integer steps, it ispossible to achieve a fine adjustment of the RLR parameter k, which isnecessary for optimal encoding performance, while keeping only integerarithmetic, which is necessary to allow the decoder to precisely trackthe k adjustment steps.

The selection component 720 allows for a selection between losslessbi-level encoding, utilizing the lossless bi-level encoder 710, and thebi-level encoding system (e.g., employing clusters (lossless or lossy)).Selection can be based, for example, upon a user preference and/or by aclustering system 610 within the bi-level encoding system 600. In oneexample, the clustering system 610 determines that it would be moreefficient to proceed with lossless bi-level encoding and provides anoutput to the selection component 720 facilitating selection of thelossless bi-level encoder 710.

For example, for handwritten notes or other graphics, the clusteringsystem 610 can be determine clustering to be less effective thanlossless bi-level encoding (e.g., since there aren't many repeatedclusters). According, the selection component 720 allows for utilizationof the lossless bi-level encoder 710.

It is to be appreciated that the lossless bi-level encoder 710 and/orthe selection component 720 can be implemented as one or more computercomponents, as that term is defined herein.

Turning next to FIG. 8, a bi-level decoding system 800 in accordancewith an aspect of the present invention is illustrated. The bi-leveldecoding system 800 includes a first decoder 810, a second decoder 920,a third decoder 830, a fourth decoder 840, a cluster generator 850 and acombiner 860.

The first decoder 810 decodes at least part of a bit stream input (e.g.,produced by a corresponding encoder) and provides page position(s) 864of cluster(s). In one example, the first decoder 810 employs bit-planedecoding.

The second decoder 820 decodes at least part of a bit stream input(e.g., produced by a corresponding encoder) and provides decodeddictionary positions 868. For example, the second decoder 820 can employLZX decoding.

The third decoder 830 decodes at least part of a bit stream input (e.g.,produced by a corresponding encoder) and provides a decoded globaldictionary of shapes 872 and/or a decoded page dictionary of shapes 876.For example, the third decoder 830 can employ lossless bi-leveldecoding.

The fourth decoder 840 decodes at least part of a bit stream input(e.g., produced by a corresponding encoder) and provides a store ofunclustered shapes 880. For example, the fourth decoder 840 can employlossless bi-level decoding.

The cluster generator 850 generates clusters based, at least in part,upon the page positions, dictionary positions and at least one of theglobal dictionary and page dictionary.

The combiner 860 provides a bi-level output based, at least in part,upon the clusters generated by the cluster generator 850 and/or thestore of unclustered shape(s) 880.

In view of the exemplary systems shown and described above,methodologies that may be implemented in accordance with the presentinvention will be better appreciated with reference to the flow chartsof FIGS. 9, 10, 11, 12, 13 and 14. While, for purposes of simplicity ofexplanation, the methodologies is shown and described as a series ofblocks, it is to be understood and appreciated that the presentinvention is not limited by the order of the blocks, as some blocks may,in accordance with the present invention, occur in different ordersand/or concurrently with other blocks from that shown and describedherein. Moreover, not all illustrated blocks may be required toimplement the methodologies in accordance with the present invention.

The invention may be described in the general context ofcomputer-executable instructions, such as program modules, executed byone or more components. Generally, program modules include routines,programs, objects, data structures, etc. that perform particular tasksor implement particular abstract data types. Typically the functionalityof the program modules may be combined or distributed as desired invarious embodiments.

Turning to FIG. 9, a method 900 for performing bi-level encoding inaccordance with an aspect of the present invention is illustrated. At910, cluster analysis is performed. For example, connected componentinformation associated with a bitmap can be analyzed (e.g., by a clustershape estimator 110). The connected component information can includecolor, horizontal size, vertical size, horizontal position and/orvertical position of the connected components. At 914, cluster(s) areextracted. For example, the extracted cluster(s) can be stored in aglobal dictionary, a page dictionary and a store of unclustered shapes.

Next, at 920, unclustered shape(s) are encoded. For example, theunclustered shape(s) can include connected component(s) that are eithertoo small (e.g., smaller than a third threshold) or large (e.g., largerthan a fourth threshold) to be text characters and therefore do notcluster well. The unclustered shape(s) can be encoded utilizing losslessbi-level encoding.

At 930, pointer(s) into the global dictionary are identified. Thepointer(s) can be identified based, at least in part, upon the clusteranalysis and/or connected component information. At 940, the pointer(s)are encoded. In one example, because the clusters have been sorted byposition on the page, the indices (e.g., pointers) tend to form a textstring-like order encoding is performed employing a compressionalgorithm suitable for text strings (e.g., LZX encoding).

At 950, page position(s) are identified. The page position(s) are forclusters in the global dictionary and/or the page dictionary and can beidentified utilizing the connected component information. Thus, for acluster in the global dictionary and/or the page dictionary, itsposition on a page is determined utilizing the connected componentinformation and the properties from its dictionary entry from either theglobal dictionary or the page dictionary. At 960, the page position(s)are encoded, for example, utilizing bit-plane encoding.

At 970, a determination is made as to whether lossless mode is desired.If the determination at 970 is YES, at 980, residual image(s) areencoded and processing continues at 990. If the determination at 970 isNO, processing continues at 990. At 990, the page dictionary is encoded.At 992, the global dictionary is encoded (e.g., utilizing losslessbi-level encoding).

Referring next to FIGS. 10 and 11, a method 1000 for performing bi-levelencoding in accordance with an aspect of the present invention isillustrated. At 1004, information regarding a cluster is received (e.g.,color, horizontal size, vertical size, horizontal position and/orvertical position).

At 1008, a determination is made as to whether the cluster is in theglobal dictionary. For example, in lossless mode, the determination canbe based upon whether the cluster is within a first threshold amount ofa cluster in the global dictionary. Further, in lossy mode, thedetermination can be based upon whether the cluster is within a secondthreshold amount of a cluster in the global dictionary.

If the determination at 1008 is YES, processing continues at 1012. Ifthe determination at 1008 is NO, at 1016, a determination is made as towhether the cluster is in the page dictionary. If the determination at1016 is NO, at 1020, the cluster is stored in the page dictionary andprocessing continues at 1012. If the determination at 1016 is YES, at1024, the cluster is stored in the global dictionary. At 1028, thecluster is removed from the page dictionary and processing continues at1012.

At 1012, the cluster is extracted from the bitmap. Next, at 1032, adetermination is made as to whether there are more cluster(s) on thepage. If the determination at 1032 is YES, processing continues at 1004.If the determination 1032 is NO, at 1036, the page dictionary isencoded. At 1040, global dictionary pointer(s) for cluster(s) on thepage are identified. At 1044, the global dictionary pointer(s) forcluster(s) on the page are encoded. Next, at 1048, a determination ismade as to whether there are more page(s). If the determination at 1040is YES, processing continues at 1004. If the determination at 1040 isNO, at 1052, the global dictionary is encoded.

Turning next to FIGS. 12 and 13, a method 1200 for performing clusteranalysis in accordance with an aspect of the present invention isillustrated. At 1204, cluster(s) are identified. At 1208, activitydetection is performed. At 1212, cluster analysis is performed. At 1216,unclustered shape(s) are encoded. At 1220, pointer(s) into the globaldictionary are identified. At 1224, pointer(s) are encoded. At 1228,page position(s) are identified. At 1232, page position(s) are encoded.At 1236, a determination is made as to whether lossless mode is desired.If the determination at 1236 is YES, at 1240, the residual image(s) areencoded and processing continues at 1244. If the determination at 1236is NO, processing continues at 1244. At 1244, the page dictionary isencoded. At 1248, the global dictionary is encoded.

Referring to FIG. 14, a method 1400 for performing bi-level decoding inaccordance with an aspect of the present invention is illustrated. At1410, page position(s) are decoded. At 1420, dictionary position(s) aredecoded. At 1430, a global dictionary is decoded. At 1440, a pagedictionary is decoded. At 1450, unclustered shape(s) are decoded. At1460, cluster(s) are generated based, at least in part, upon the pageposition(s), dictionary position(s) and the global dictionary and/or thepage dictionary. At 1460, the generated cluster(s) and the unclusteredshape(s) are combined, for example, to form a bi-level image.

It is to be appreciated that the system and/or method of the presentinvention can be utilized in an overall compression system facilitatingcompression of text, handwriting, drawings, pictures and the like.Further, those skilled in the art will recognize that the system and/ormethod of the present invention can be employed in a vast array ofdocument image applications, including, but not limited to, tabletpersonal computers, photocopiers, document scanners, optical characterrecognition systems, PDAs, fax machines, digital cameras, digital videocameras and/or video games.

In order to provide additional context for various aspects of thepresent invention, FIG. 15 and the following discussion are intended toprovide a brief, general description of a suitable operating environment1510 in which various aspects of the present invention may beimplemented. While the invention is described in the general context ofcomputer-executable instructions, such as program modules, executed byone or more computers or other devices, those skilled in the art willrecognize that the invention can also be implemented in combination withother program modules and/or as a combination of hardware and software.Generally, however, program modules include routines, programs, objects,components, data structures, etc. that perform particular tasks orimplement particular data types. The operating environment 1510 is onlyone example of a suitable operating environment and is not intended tosuggest any limitation as to the scope of use or functionality of theinvention. Other well known computer systems, environments, and/orconfigurations that may be suitable for use with the invention includebut are not limited to, personal computers, hand-held or laptop devices,multiprocessor systems, microprocessor-based systems, programmableconsumer electronics, network PCs, minicomputers, mainframe computers,distributed computing environments that include the above systems ordevices, and the like.

With reference to FIG. 15, an exemplary environment 1510 forimplementing various aspects of the invention includes a computer 1512.The computer 1512 includes a processing unit 1514, a system memory 1516,and a system bus 1518. The system bus 1518 couples system componentsincluding, but not limited to, the system memory 1516 to the processingunit 1514. The processing unit 1514 can be any of various availableprocessors. Dual microprocessors and other multiprocessor architecturesalso can be employed as the processing unit 1514.

The system bus 1518 can be any of several types of bus structure(s)including the memory bus or memory controller, a peripheral bus orexternal bus, and/or a local bus using any variety of available busarchitectures including, but not limited to, 15-bit bus, IndustrialStandard Architecture (ISA), Micro-Channel Architecture (MSA), ExtendedISA (EISA), Intelligent Drive Electronics (IDE), VESA Local Bus (VLB),Peripheral Component Interconnect (PCI), Universal Serial Bus (USB),Advanced Graphics Port (AGP), Personal Computer Memory CardInternational Association bus (PCMCIA), and Small Computer SystemsInterface (SCSI).

The system memory 1516 includes volatile memory 1520 and nonvolatilememory 1522. The basic input/output system (BIOS), containing the basicroutines to transfer information between elements within the computer1512, such as during start-up, is stored in nonvolatile memory 1522. Byway of illustration, and not limitation, nonvolatile memory 1522 caninclude read only memory (ROM), programmable ROM (PROM), electricallyprogrammable ROM (EPROM), electrically erasable ROM (EEPROM), or flashmemory. Volatile memory 1520 includes random access memory (RAM), whichacts as external cache memory. By way of illustration and notlimitation, RAM is available in many forms such as synchronous RAM(SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rateSDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), anddirect Rambus RAM (DRRAM).

Computer 1512 also includes removable/nonremovable, volatile/nonvolatilecomputer storage media. FIG. 15 illustrates, for example a disk storage1524. Disk storage 1524 includes, but is not limited to, devices like amagnetic disk drive, floppy disk drive, tape drive, Jazz drive, Zipdrive, LS-100 drive, flash memory card, or memory stick. In addition,disk storage 1524 can include storage media separately or in combinationwith other storage media including, but not limited to, an optical diskdrive such as a compact disk ROM device (CD-ROM), CD recordable drive(CD-R Drive), CD rewritable drive (CD-RW Drive) or a digital versatiledisk ROM drive (DVD-ROM). To facilitate connection of the disk storagedevices 1524 to the system bus 1518, a removable or non-removableinterface is typically used such as interface 1526.

It is to be appreciated that FIG. 15 describes software that acts as anintermediary between users and the basic computer resources described insuitable operating environment 1510. Such software includes an operatingsystem 1528. Operating system 1528, which can be stored on disk storage1524, acts to control and allocate resources of the computer system1512. System applications 1530 take advantage of the management ofresources by operating system 1528 through program modules 1532 andprogram data 1534 stored either in system memory 1516 or on disk storage1524. It is to be appreciated that the present invention can beimplemented with various operating systems or combinations of operatingsystems.

A user enters commands or information into the computer 1512 throughinput device(s) 1536. Input devices 1536 include, but are not limitedto, a pointing device such as a mouse, trackball, stylus, touch pad,keyboard, microphone, joystick, game pad, satellite dish, scanner, TVtuner card, digital camera, digital video camera, web camera, and thelike. These and other input devices connect to the possessing unit 1516through the system bus 1518 via interface port(s) 1538. Interfaceport(s) 1538 include, for example, a serial port, a parallel port, agame port, and a universal serial bus (USB). Output device(s) 1540 usesome of the same type of ports as input device(s) 1536. Thus, forexample, a USB port may be used to provide input to computer 1512, andto output information from computer 1512 to an output device 1540.Output adapter 1542 is provided to illustrate that there are some outputdevices 1540 like monitors, speakers, and printers among other outputdevices 1540 that require special adapters. The output adapters 1542include, by way of illustration and not limitation, video and soundcards that provide a means of connection between the output device 1540and the system bus 1518. It should be noted that other devices and/orsystems of devices provide both input and output capabilities such asremote computer(s) 1544.

Computer 1512 can operate in a networked environment using logicalconnections to one or more remote computers, such as remote computer(s)1544. The remote computer(s) 1544 can be a personal computer, a server,a router, a network PC, a workstation, a microprocessor based appliance,a peer device or other common network node and the like, and typicallyincludes many or all of the elements described relative to computer1512. For purposes of brevity, only a memory storage device 1546 isillustrated with remote computer(s) 1544. Remote computer(s) 1544 islogically connected to computer 1512 through a network interface 1548and then physically connected via communication connection 1550. Networkinterface 1548 encompasses communication networks such as local-areanetworks (LAN) and wide-area networks (WAN). LAN technologies includeFiber Distributed Data Interface (FDDI), Copper Distributed DataInterface (CDDI), Ethernet/IEEE 1502.3, Token Ring/IEEE 1502.5 and thelike. WAN technologies include, but are not limited to, point-to-pointlinks, circuit switching networks like Integrated Services DigitalNetworks (ISDN) and variations thereon, packet switching networks, andDigital Subscriber Lines (DSL).

Communication connection(s) 1550 refers to the hardware/softwareemployed to connect the network interface 1548 to the bus 1518. Whilecommunication connection 1550 is shown for illustrative clarity insidecomputer 1512, it can also be external to computer 1512. Thehardware/software necessary for connection to the network interface 1548includes, for exemplary purposes only, internal and externaltechnologies such as, modems including regular telephone grade modems,cable modems and DSL modems, ISDN adapters, and Ethernet cards.

What has been described above includes examples of the presentinvention. It is, of course, not possible to describe every conceivablecombination of components or methodologies for purposes of describingthe present invention, but one of ordinary skill in the art mayrecognize that many further combinations and permutations of the presentinvention are possible. Accordingly, the present invention is intendedto embrace all such alterations, modifications and variations that fallwithin the spirit and scope of the appended claims. Furthermore, to theextent that the term “includes” is used in either the detaileddescription or the claims, such term is intended to be inclusive in amanner similar to the term “comprising” as “comprising” is interpretedwhen employed as a transitional word in a claim.

1. A bi-level decoding system, comprising: a first decoder that decodesat least part of a bit stream, the first decoder decoding pagepositions; a second decoder that decodes at least part of the bitstream, the second decoder decoding dictionary positions; a thirddecoder that decodes at least part of the bit stream, the third decoderdecoding a global dictionary of shapes and a page dictionary of shapes;a fourth decoder that decodes at least part of the bit stream, thefourth decoder decoding a store of unclustered shapes; a clustergenerator that generates clusters based, at least in part, upon the pagepositions, dictionary positions and at least one of the globaldictionary and page dictionary; and, a combiner that provides a bi-leveloutput based, at least in part, upon the generated clusters and thestore of unclustered shapes.
 2. The bi-level decoding system of claim 1,the first decoder employing, at least in part, upon bit-plane decoding.3. The bi-level decoding system of claim 1, the second decoderemploying, at least in part, upon LZX decoding.
 4. The bi-level decodingsystem of claim 1, the third decoder employing, at least in part, uponlossless bi-level decoding.
 5. The bi-level decoding system of claim 1,the fourth decoder employing, at least in part, upon a lossless bi-leveldecoding.
 6. A method for bi-level decoding, comprising: decoding a pageposition; decoding a dictionary position; decoding a global dictionary;and, generating a cluster based, at least in part, upon the pageposition, the dictionary position and the global dictionary to provide abi-level output.
 7. The method of claim 6, further comprising at leastone of the following acts: decoding a page dictionary; decoding anunclustered shape; combining the cluster and the unclustered shape toprovide the bi-level output.
 8. (canceled)
 9. A computer readable mediumstoring computer executable components of a system for bi-leveldecoding, comprising: a first decoder that decodes at least part of abit stream, the first decoder decoding page positions; a second decoderthat decodes at least part of the bit stream, the second decoderdecoding dictionary positions; a third decoder that decodes at leastpart of the bit stream, the third decoder decoding a global dictionaryof shapes and a page dictionary of shapes; a fourth decoder that decodesat least part of the bit stream, the fourth decoder decoding a store ofunclustered shapes; a cluster generator that generates clusters based,at least in part, upon the page positions, dictionary positions and atleast one of the global dictionary and page dictionary; and, a combinerthat provides a bi-level output based, at least in part, upon thegenerated clusters and the store of unclustered shapes.
 10. (canceled)